package com.cyj.dream.admin.service.system.impl;

import com.alibaba.fastjson.JSONObject;
import com.cyj.dream.admin.model.system.SysIconElement;
import com.cyj.dream.admin.persistence.manager.systems.SysIconElementManager;
import com.cyj.dream.admin.service.system.SysIconElementService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: icon图标模块 服务实现类
 * @BelongsProject: dream-DreamChardonnay
 * @BelongsPackage: com.dream.DreamChardonnay.service.impl
 * @Author: ChenYongJia
 * @CreateTime: 2021-04-16 10:05
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
@Slf4j
@Service
public class SysIconElementServiceImpl implements SysIconElementService {

    @Autowired
    private SysIconElementManager sysIconElementManager;

    /**
     * 添加饿了么组件图标模块数据
     *
     * @param sysIconElement icon 实体对象
     * @return boolean
     * @date 2021/4/16 10:06
     * @author ChenYongJia
     * @version 1.0
     */
    @Override
    public boolean addIconElement(SysIconElement sysIconElement) {
        log.info("进入添加饿了么组件图标模块数据方法，参数为：{}", JSONObject.toJSONString(sysIconElement));
        return sysIconElementManager.addIconElement(sysIconElement);
    }

    /**
     * 查询饿了么组件所有图标信息
     * @return com.dream.DreamChardonnay.constant.model.Response<java.util.List<com.dream.DreamChardonnay.model.system.SysIconElement>>
     * @date 2021/4/16 10:08
     * @author ChenYongJia
     * @version 1.0
     */
    @Override
    public List<SysIconElement> findAllIconList() {
        log.info("进入查询饿了么组件所有图标信息方法");
        return sysIconElementManager.findAllIconList();
    }

}
